<template>
  <div class="box">
    <ul class="gra">
      <li v-for="nav in nav" :key="nav.id">
        <router-link :to="nav.path">
          <span class="iconfont" :class="nav.iconName"></span>
        </router-link>
        <p>{{ nav.name }}</p>
      </li>
    </ul>
  </div>
</template>

<script>
import getlink from "../../apis/getapi";
export default {
  data() {
    return {
      nav: [],
    };
  },
  created() {
    getlink("/data/one").then((ok) => {
      //   console.log(ok);
      this.nav = ok.data.navs;
      // console.log(this.nav);
    });
  },
};
</script>

<style scoped>
@import url(../../assets/font/iconfont.css);
.box {
  width: 100%;
  height: 1.15rem;
  padding: 0.2rem 0;
}
.gra {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.gra li {
  width: 20%;
  text-align: center;
}
.gra li span {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 100%;
  line-height: 0.5rem;
  background-color: #faf4f4;
  margin-bottom: 0.1rem;
  text-align: center;
}
/* .gra li p {
  width: 100%;
  font-size: 0.12rem;
} */
.gra li .c1 {
  width: 100%;
  font-size: 0.12rem;
}
.iconfont {
  font-size: 0.25rem;
  color: #ff5959;
}
</style>